#################################################
#Connect messages when a player joins the server#
#################################################
.
bla bla bla
.
Sub OnConnectClose()
closePrivButton("welc&pos&clos&ref");
openGlobalButton( "logo",20,0,20,4,4,-1,0,"^7Your Text" );
EndSub
Sub OnConnectCloseKick()
closePrivButton("welc&pos&clos&ref");
cmdLFS("/kick " . $Username );
EndSub
IF( $Spectateplayer = true)
THEN
openPrivButton( "noobs",15,0,40,4,4,-1,32,"^3Welcome " . $Nickname . "^3 to " . $HostName
. "&^3Here at " . $LongTrackName . " (" . $ShortTrackName . ")"
. "&^3you have a choice of cars to drive, including " . $CurrRotateCar );
ELSE
closePrivButton("noobs");
ENDIF
##################
#Drifting options#
##################
# This is the filepath for a file containing the collected data.
# This file will be created if it doesnt exist yet.
# You must ensure read/write access to this path.
#-------------------------------------------------------------------
$DriftDatabase = "./DriftPB.txt";
# Actions to do on new personal best drift lap.
Event DriftPBAction()
cmdLFS( "/rcm " . $Nickname . "^3 made new PB: ^7" . $DriftScore . " ^3pts!" );
cmdLFS( "/rcm_all" );
EndEvent
Event DriftPBAction()
cmdLFS( "/msg " . $Nickname . "^3 made new PB: ^7" . $DriftScore . " ^3pts!" );
EndEvent
# Actions to do to when total lap drift score is higher or equal to MinimumDriftScore.
Event DriftLapAction()
cmdLFS("/msg " . $Nickname . " ^3drifted to ^7" . $DriftScore . " ^3pts" );
EndEvent
# Message to get on end of each drift.
# Possible variables to use:
Event OnDriftScore()
privMsg( "Score: ^7" . $DriftScore . " ^3" . $LastDriftScore );
EndEvent
$GoodDriftScore = 4000; # Value to be reached to execute action on good drift score
Event GoodDriftAction()
privMsg( $Nickname . " ^3made excellent drift: ^7" . $LastDriftScore ." ^3pts" );
EndEvent
$MinimumDriftScore = 10; # Minimum drift score required
# Actions to do at end of lap if MinimumDriftScore is not achieved.
/*
Event DriftTooLowAction()
privMsg( $Nickname . "^3 disqualified" );
cmdLFS( "/spec " . $Nickname };
EndEvent
*/
$MinimumDriftSpeed = 50; # Minimum speed in km/h to maintain. Driving below that speed will reset score
$MinimumDriftAngle = 15; # Minimum angel to maintain. When angle is below value, score is reset
$MaximumDriftAngle = 100; # Maximum angel to maintain. When angle is above value, score is reset
#######################
#Authorization Options ( license )#
#######################
#
$Auth1 = "FBM:BL1:1.16.00";
[COLOR=red]$AuthAllowPlayer = "@username1,username2,...,usernameN";[/COLOR]
$AuthMinPlayer = 0; # Minimum number of players on the server to auto enable authorization
# If number of players is below value, alle players are allowed
# If number of players is above value, only AuthAllowPlayer are allowed
Event OnAuthAllowed()
privMsg( $Nickname . "^3 allowed to drive GTR on this server" );
Endevent
Event OnAuthNotAllowed()
IF( $Car == "FXR")
THEN
cmdLFS("/spec " . $Username . );
privMsg( $Nickname . "^3 not allowed to drive " . $Car . " on this server");
ENDIF
IF( $Car == "XRR")
THEN
cmdLFS("/spec " . $Username . );
privMsg( $Nickname . "^3 not allowed to drive " . $Car . " on this server");
ENDIF
IF( $Car == "FZR")
THEN
cmdLFS("/spec " . $Username . );
privMsg( $Nickname . "^3 not allowed to drive " . $Car . " on this server");
ENDIF
privMsg( $Nickname . "^3 allowed to drive UFR/XFR on this server");
Endevent
# Local viariable that can be used
# $auth -> Authorization reached
Event OnAuthReached()
privMsg("^3You have got level" . $auth );
EndEvent
Sub SA_weather_3()
cmdLFS("/end");
cmdLFS("/weather 2");
EndSub
Register ScheduleAction( "ss mm hh dd MM YYYY", SA_event );
Sub SA_event()
cmdLFS("/rcm RACE Event start NOW!");
cmdLFS("/rcm_all");
cmdLFS("/pass secret");
IF( $Username != "&./your_file" )
THEN
cmdLFS( "/kick " . $Username );
ENDIF
EndSub
Event OnLapperStart()
[COLOR=red]PlayerVar $pitb; (this is line #306 in PSPad) When i use GlobalVar $pitb; it works.[/COLOR]
$pitb = 0;
GlobalVar $origL ;
$origL = "50" ;
GlobalVar $origT ;
$origT = "40" ;
GlobalVar $PBorigL ;
$PBorigL = "1" ;
GlobalVar $PBorigT ;
$PBorigT = "70" ;
GlobalVar $PB2Left ;
$PB2Left = "0" ;
EndEvent
LFSLapper Version=5.7.1.4 on GNU license
2005-2008 Janez Cufer and Robert BRACCAGNI ( Gai-Luron )
LFSLapper comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it
under certain conditions. Read LICENSE for details.
Type LFSLapper -help to view usage
Started : 7/28/2008 10:35:40 PM
Parse config file...Ok
Loading WR...Not Loaded
Loading swearwords...Ok
Mode Sync = False
Connecting
Connection OK
Product:S2 Version:0.5Z InSim Version:4
Web Commands Thread Started...
Register Web Thread Started...
LFSLapper is running...
[COLOR=red]Syntax error in cfg file: var $pitb need '=' at line #306 in function 'OnLapperStart' script aborted[/COLOR]
###################################
#Event triggered when lapper start#
###################################
Event OnLapperStart()
[COLOR=red]PlayerVar $pitb; #this is line #306[/COLOR]
$pitb = "0" ;
GlobalVar $origL ;
$origL = "50" ;
GlobalVar $origT ;
$origT = "40" ;
GlobalVar $PBorigL ;
$PBorigL = "1" ;
GlobalVar $PBorigT ;
$PBorigT = "70" ;
GlobalVar $PB2Left ;
$PB2Left = "0" ;
EndEvent